package net.vidmar.tvspored;

import java.util.ArrayList;
import java.util.List;

public class Channel {
	
	public String Id;
	public String DisplayName;
	public String Url;
	public String Icon;
	
	private List<Programme> Programmes = new ArrayList<Programme>();

	public Channel() {
	}

	public Channel(String id, String displayName, String url, String icon) {
		super();
		Id = id;
		DisplayName = displayName;
		Url = url;
		Icon = icon;
	}

	public List<Programme> getProgrammes(MyDate date)
	{
		List<Programme> f = new ArrayList<Programme>();
		for (Programme p : Programmes)
		{		
			if (p.Date.equals(date))
				f.add(p);
		}
		return f;
	}
	
	@Override
	public String toString() {
		return DisplayName;
	}

	public void addProgramme(Programme programme) {
		Programmes.add(programme);
	}
	
}